#include<stdio.h>

int main(void)
{
	int x,n,sum=0;
	scanf("%d",&x);
	n=1;
	while((sum+n*n)<=x){
		sum=sum+n*n;
		n++;
	}
	n=n-1;
	printf("%d\n",n);
	return 0;
}
